export default function useLoading() {
  const loading = document.body;
  const showLoad = (delay) => {
    setTimeout(() => loading.classList.add("loading"), delay);
  };

  const hideLoad = (delay) => {
    setTimeout(() => loading.classList.remove("loading"), delay);
  };
  return {
    showLoad,
    hideLoad,
  };
}
